//导入bcrypt模块
const bcrypt = require('bcrypt');

async function run() {
    //生成随机字符串
    const salt = await bcrypt.genSalt(10);
    //使用随机字符串对密码进行加密
    const pass = await bcrypt.hash('1234', salt);
    console.log(pass)
}

run();